package com.ykh.spring;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-08-24
 * Time: 16:58
 */
//切面类
@Component
@Aspect   //将当前组件标识为切面
public class LoggerAspect {

    @Before("execution(public int com.ykh.spring.CalculateImpl.add(int int)")
    public void beforAdviceMethod() {
        System.out.println("LoggerAspect  前置通知" );
    }
}
